package easy;

public class Solution_1374 {

    public String generateTheString(int n) {
        int end = n - 1 + (n % 2);
        char[] chars = new char[n];
        for (int i = 0; i < end; i++) {
            chars[i] = 'a';
        }
        if (end < n) {
            chars[end] = 'b';
        }
        return new String(chars);
    }

    public static void main(String[] args) {
        Solution_1374 model = new Solution_1374();
        System.out.println(model.generateTheString(1));
        System.out.println(model.generateTheString(2));
        System.out.println(model.generateTheString(4));
        System.out.println(model.generateTheString(5));
    }
}
